<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>碧桂园智慧工地</title>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta http-equiv="cache-control" content="no-cache">
  <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
  <link rel="icon" type="image/x-icon" href="/static/bgy_logo.png">
  <link href=//at.alicdn.com/t/font_893333_1p0al6ec771.css rel=stylesheet>
</head>
<body>
<!--[if lt IE 10]>
<div class="v-ie9">
  <p>碧桂园智慧工地暂不支持ie9及以下版本</p>
  <p>
    <span>请使用</span>
    <a href="http://rj.baidu.com/soft/detail/14744.html?ald" target="_blank">chrome浏览器</a>，
    <a href="http://rj.baidu.com/soft/detail/11843.html" target="_blank">火狐浏览器</a>，如果是360，QQ等国产浏览器请切换到极速模式</p>
</div>
<![endif]-->
<div id="app"></div>

</body>
<script language="javascript" for="mpv" event="MPV_FireWndSelected(lWndId, cameraUuid)">
  if(cameraUuid === '') return
  function GetCameryRequest () {
    var strs = null
    var url = location.href
    var theRequest = {}
    if (url.indexOf('?') !== -1) {
      var str = url.substr(1)
      var str1 = str.split('?')
      strs = str1[1].split('&')
      for (let i = 0; i < strs.length; i++) {
        theRequest[strs[i].split('=')[0]] = decodeURIComponent(strs[i].split('=')[1])
      }
    }
    return theRequest
  }
  var cameraHKType = 1
  var cameraHKId = 1
  var requestQuery = GetCameryRequest()
  var cameraQuery = {
    cameraId: cameraUuid,
    name: requestQuery.name
  }
  if (requestQuery.departmentId) {
    cameraHKType = 'departmentId'
    cameraHKId = requestQuery.departmentId
  } else {
    cameraHKType = 'pjId'
    cameraHKId = requestQuery.pjId
  }
  cameraQuery[cameraHKType] = cameraHKId

  window.SPJKVIDEO.$router.push({name: 'videoControl', query: cameraQuery})

</script>
<script>
  window.onbeforeunload = function () {
    if (document.getElementById('mpv')) {
      var ocxObj = document.getElementById('mpv')
      ocxObj.MPV_Uninit()
    }
    if (document.getElementById('spv')) {
      var ocxSingerObj = document.getElementById('spv')
      ocxSingerObj.MPV_Uninit()
    }
  }
</script>
<script language="javascript" for="mpv" event="MPV_FirePreviewResult(lWndId, lPreviewResult)">
  var _item = window.SPJKVIDEO.deviceVideoList
  var _nameItem = window.SPJKVIDEO.projectNameArray
  var _nameObj = window.SPJKVIDEO.projectNameObject
  if (lPreviewResult === 1) {
    if (window.SPJKVIDEO.$router.history.current.name === 'videoProject') {
      if (_item[lWndId]) {
        window.SPJKVIDEO.SetOSD(_item[lWndId].cameraUuid, _nameObj, _item[lWndId].departmentName)
      }
    } else {
      if (_item[lWndId]) {
        window.SPJKVIDEO.SetOSD(_item[lWndId].cameraUuid, _nameItem[lWndId].projectTitle, _item[lWndId].departmentName)
      }
    }
  }
</script>
<script language="javascript" for="spv" event="MPV_FirePreviewResult(lWndId, lPreviewResult)">
  window.SINGOCXVIEDEO.SetSpvOSD()
</script>
<script language="javascript" for="spv" event="MPV_FireFullScreen(lFullScreen)">
  if (lFullScreen !== 1) {
    let ocxObj = document.getElementById('spv')
    ocxObj.MPV_ShowMainToolBar(0)
    // ocxObj.MPV_SetToolBar()
  }
</script>
<script src="static/html2canvas.js"></script>
<script src="https://cdn.bootcss.com/jspdf/1.5.3/jspdf.debug.js"></script>
</html>
